<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Iniuriam: /home/etu/v/p1115890/LIF7/EncoreUn/iniuriam/src/deplacement.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Iniuriam
   &#160;<span id="projectnumber">alpha 1</span>
   </div>
   <div id="projectbrief"> RPG futuriste</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">/home/etu/v/p1115890/LIF7/EncoreUn/iniuriam/src/deplacement.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="deplacement_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef __deplacement_h__</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define __deplacement_h__</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="constante_8h.html">constante.h</a>&quot;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 
<a name="l00019"></a>00019 <span class="keywordtype">void</span> <a class="code" href="deplacement_8c.html#ab29f0855510a92ec6d71eca3fffc3f2d" title="Preconditions : /   Postconditions : copie tab dans tab2.">copieTab2D</a> (<span class="keywordtype">char</span> tab[<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>], <span class="keywordtype">char</span> tab2 [<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][TAILLE_MAX_L]);
<a name="l00020"></a>00020 
<a name="l00025"></a>00025 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a74759ae4434c551591a87aecc9fa9daf" title="Preconditions : /   Postconditions : retourne 1 si tab1 différent de tab2, 0 sinon.">estDifferentTab2D</a> (<span class="keywordtype">char</span> tab1 [<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>],<span class="keywordtype">char</span> tab2 [<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][TAILLE_MAX_L]);
<a name="l00026"></a>00026 
<a name="l00031"></a>00031 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a9a8ac44c929cb97e983ac1d93b3a6b8a" title="Preconditions : 0&lt;=y&lt;TAILLE_MAX_H   Postconditions : vérifie l&#39;accessibilité de la case y de tab : reto...">deplacerCaseColonne</a> (<span class="keywordtype">int</span> y, <span class="keywordtype">char</span> tab [<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>]);
<a name="l00032"></a>00032 
<a name="l00037"></a>00037 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a32acc42e9d14b990440b36ef81031ab1" title="Preconditions : 0&lt;=x&lt;TAILLE_MAX_L   Postconditions : vérifie l&#39;accessibilité de la case x de tab : reto...">deplacerCaseLigne</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">char</span> tab [<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>]);
<a name="l00038"></a>00038 
<a name="l00043"></a>00043 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#afb7f6fa97a05c639350cd7d4891a2912" title="Preconditions : 0&lt;=y&lt;TAILLE_MAX_H   Postconditions : vérifie si le déplacement vers la case (x) de tab ...">testRetourColonne</a> (<span class="keywordtype">int</span> y, <span class="keywordtype">char</span> tab [<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>]);
<a name="l00044"></a>00044 
<a name="l00049"></a>00049 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a6b9ac7a4a8b64aac310d0dda786775db" title="Preconditions : 0&lt;=x&lt;TAILLE_MAX_L   Postconditions : vérifie si le déplacement vers la case (x) de tab ...">testRetourLigne</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">char</span> tab [<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>]);
<a name="l00050"></a>00050 
<a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="deplacement_8c.html#a0def3495d62789e36a0d254f57838212" title="Preconditions : 0&lt;=col&lt;TAILLE_MAX   Postconditions : retourne la yième colonne de tab...">getColonne</a>(<span class="keywordtype">int</span> col, <span class="keywordtype">char</span> tab[<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>], <span class="keywordtype">char</span>*tamp);
<a name="l00056"></a>00056 
<a name="l00061"></a>00061 <span class="keywordtype">char</span> <a class="code" href="affichage__SDL__Editeur_8c.html#abd8bbcfabb3ddef2ccaafb9928a37b95">min</a> (<span class="keywordtype">char</span> a, <span class="keywordtype">char</span> b);
<a name="l00062"></a>00062 
<a name="l00067"></a>00067 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a219f44c888be90d6a484f4e231c92cef" title="Preconditions : /   Postconditions : retourne le maximum de a et b.">max</a> (<span class="keywordtype">char</span> a, <span class="keywordtype">char</span> b);
<a name="l00068"></a>00068 
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="deplacement_8c.html#a3e31d5019b581928ec4310a0cd465abc" title="Preconditions : /   Postconditions : affiche un tableau à 2 dimensions, ici tab.">afficherTab2D</a> (<span class="keywordtype">char</span> tab[<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>]);
<a name="l00074"></a>00074 
<a name="l00079"></a>00079 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a166af685bbfa4653cd6b019bdc30681d" title="Preconditions : 0&lt;=x&lt;TAILLE_MAX, 0&lt;=y&lt;TAILLE_MAX, 0&lt;i&lt;=4   Postconditions : retourne la case 2 ou 3 l...">chercher2</a> (<span class="keywordtype">char</span> tab[<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>],<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y,<span class="keywordtype">char</span> i);
<a name="l00080"></a>00080 
<a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="deplacement_8c.html#ad09ce5178d9f3a194a9109a6fb02520e" title="Preconditions : 0&lt;=x&lt;TAILLE_MAX, 0&lt;=y&lt;TAILLE_MAX, 0&lt;i&lt;=4   Postconditions : bloque les cases adjacent...">tunnel</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">char</span> tab [<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>], <span class="keywordtype">int</span> i);
<a name="l00086"></a>00086 
<a name="l00091"></a>00091 <span class="keywordtype">void</span> <a class="code" href="deplacement_8c.html#aa29da95d423fa107da55482c4a74cdeb" title="Preconditions : 0&lt;=x&lt;TAILLE_MAX, 0&lt;=y&lt;TAILLE_MAX, 0&lt;i&lt;=4   Postconditions : libère les cases adjacent...">reinitTunnel</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">char</span> tab [<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>]);
<a name="l00092"></a>00092 
<a name="l00098"></a>00098 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a30b9132afe4b97891cc1237ed491e7f3" title="Preconditions : /   Postconditions : retourne le minimum de droite, gauche, haut et bas...">quatreChemins</a> (<span class="keywordtype">char</span> droite, <span class="keywordtype">char</span> haut, <span class="keywordtype">char</span> bas, <span class="keywordtype">char</span> gauche);
<a name="l00099"></a>00099 
<a name="l00104"></a>00104 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a1310fd0e14a6c16e730b4bb85d1ff992" title="Preconditions : 0&lt;=x&lt;TAILLE_MAX, 0&lt;=y&lt;TAILLE_MAX, 0&lt;=z&lt;TAILLE_MAX, 0&lt;=t&lt;TAILLE_MAX   Postconditions :...">deplacementIA</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> z, <span class="keywordtype">int</span> t, <span class="keywordtype">char</span> tab [<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>]);
<a name="l00105"></a>00105 
<a name="l00110"></a>00110 <span class="keywordtype">char</span> <a class="code" href="deplacement_8c.html#a9f8f0b61d71e8253525c954687257673" title="Preconditions : 0&lt;=x&lt;TAILLE_MAX, 0&lt;=y&lt;TAILLE_MAX, 0&lt;=z&lt;TAILLE_MAX, 0&lt;=t&lt;TAILLE_MAX   Postconditions :...">chemin</a> (<span class="keywordtype">int</span> x,<span class="keywordtype">int</span> y, <span class="keywordtype">int</span> z, <span class="keywordtype">int</span> t, <span class="keywordtype">char</span> tab[<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>]);
<a name="l00111"></a>00111 
<a name="l00116"></a>00116 <span class="keywordtype">int</span> <a class="code" href="deplacement_8c.html#ac9cf0b5d5469adde44830a129b5f1a4c" title="Preconditions : 0&lt;=a&lt;TAILLE_MAX, 0&lt;=b&lt;TAILLE_MAX   Postconditions : Rapproche un perso de sa destination ...">seRapprocher</a>(<span class="keywordtype">char</span> tab[<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>], <span class="keywordtype">int</span>* a, <span class="keywordtype">int</span>* b, <span class="keywordtype">int</span> nb, <span class="keywordtype">char</span>* orientation);
<a name="l00117"></a>00117 
<a name="l00122"></a>00122 <span class="keywordtype">int</span> <a class="code" href="deplacement_8c.html#aa180ef1e90aac8704883c1b29320ffc3" title="Preconditions : 0&lt;=a&lt;TAILLE_MAX, 0&lt;=b&lt;TAILLE_MAX   Postconditions : Eloigne un perso de sa destination de...">sEloigner</a>(<span class="keywordtype">char</span> tab[<a class="code" href="constante_8h.html#ac1049bafa9c744bc36db5e3a0a6cf8ed">TAILLE_MAX_H</a>][<a class="code" href="constante_8h.html#aebaf3b6f2e7f670f39b91564011c9d20">TAILLE_MAX_L</a>], <span class="keywordtype">int</span>* a, <span class="keywordtype">int</span>* b, <span class="keywordtype">int</span> nb, <span class="keywordtype">char</span>* orientation);
<a name="l00123"></a>00123 
<a name="l00124"></a>00124 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Jun 4 2013 08:45:33 for Iniuriam by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
